//2009/08/23 00:56:00
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class EllipseCoverage
{
public:
    int calculateCoverage(int x1, int y1, int x2, int y2, int d)
    {
        int ret = 0;
        for (int i=-300; i<=300; i++)
            for (int j=-300; j<=300; j++)
                if (dis(x1,y1,i,j) + dis(x2, y2, i, j) < 1.0 * d)
                    ret++;
        return ret;
    }
private:
    double dis(int x, int y, int p, int q)
    {
        double ret = (x-p)*(x-p) + (y-q)*(y-q);
        return sqrt(ret);
    }
};
